/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fresh.bus.canoe.command.support;

import com.fresh.bus.canoe.command.Command;
import com.fresh.bus.canoe.exception.ServerException;
import com.fresh.bus.canoe.message.InternalOpCodes;
import com.fresh.bus.canoe.message.Request;
import com.fresh.bus.canoe.message.Response;
import com.fresh.bus.canoe.session.Session;

/**
 *
 * @author panzd
 */
public class PingCommand implements Command<Response> {
    /**
     * 心跳包
     * @param session
     * @param request with Opcodes.PING
     * @return
     * @throws ServerException
     */
    @Override
    public Response invoke(Session session, Request request) throws ServerException {
        return new Response(InternalOpCodes.PONG);
    }
}
